<?php

namespace app\popo\dto;

use app\popo\vo\Required;
use Webman\Http\Request;

class EditPasswordRequest extends BaseDto
{
    #[Required(min:6, max:20)]
    private string $oldPassword;

    #[Required(min:6, max:20)]
    private string $newPassword;

    public function __construct(Request $request)
    {
        $this->newPassword = $request->input("newPassword");
        $this->oldPassword = $request->input("oldPassword");
        $this->validateRequired();
    }

    public function getOldPassword()
    {
        return $this->oldPassword;
    }

    public function getNewPassword()
    {
        return $this->newPassword;
    }
}